import request from "@/util/request.js";

export function login(username, password) {
  return request.post("/api/private/v1/login", { username, password });
}

export function getUsers({ query, pagenum, pagesize }) {
  return request.get("/api/private/v1/users", {
    params: { query, pagenum, pagesize }
  });
}

export function getUserByID(ID) {
  return request.get("/api/private/v1/users/" + ID);
}

export function editUser(ID, email, mobile) {
  return request.put("/api/private/v1/users/" + ID, { email, mobile });
}
